﻿using Axis.BusinessObject.Core;
using Axis.Dao.Layout;
using PhuLeBooze.Global;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace PhuLeBooze.Views.Slider.Service
{
    /// <summary>
    /// Summary description for SliderAction
    /// </summary>
    public class SliderAction : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.Write(UpdateGift(context));
        }
        protected string UpdateGift(HttpContext context)
        {
            CCore cCore = new CCore();
            string inputValue = cCore.GetInputValue(context);
            /* Action */
            CLayoutDao cLayoutDao = new CLayoutDao();
            CApplicationMessage message = cLayoutDao.ActionSlideBarItem(inputValue);
            return new JavaScriptSerializer().Serialize(message);
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}